package com.funShopping.user.controller;

import com.funShopping.user.domain.TbUser;
import com.funShopping.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.repository.query.Param;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: funShopping
 * @description: 用户控制层
 * @author: talented_zhang
 * @create: 2024-03-25 22:11
 **/
@RestController
@RequestMapping("user")
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping("id/{id}")
    public TbUser getById(@Param("id") Integer userId){
        return userService.getById(userId);
    }
}
